<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
        <style>
            .active{
                background-color:green;
            }
            .text-danger{
                color:red;
            }
            .error{
                color:orange;
            }
        </style>
    </head>
    <body>
        <div id="app">
           <div :class="activeClass">String</div>
           <div :class="{active:isActive,'text-danger':hasError}">Object</div>
           <div :class="[activeClass,errorClass]">Array</div>
        </div>
        <script src="my-vue.js"></script>
        <script>
        var vm = new Vue({
            el:'#app',
            data:{
                activeClass:'active',
                errorClass:'error',
                isActive:true,
                hasError:true
            }
        });
    </script>
    </body>
</html>